import { Theme } from "../common/theme";

declare global {
  interface Window {
    notebook: any;
  }
}
export interface GetNotesOptions {
  limit?: number;
  offset?: number;
  search?: string;
  sort?: string;
  order?: string;
}
export function injectNotebook() {
  const notebook = {
    version: window.navtiveApi.version,
    ui: {
      theme: Theme.auto,
    },
    api: {
      setThemeColor: window.navtiveApi.setThemeColor,
      contents: {
        getNotes(options?: GetNotesOptions) {},
      },
    },
  };

  Object.defineProperty(window, "notebook", {
    value: notebook,
    writable: false,
    configurable: false,
    enumerable: false,
  });
}
